package com.design.pattern.command.executor;

import com.design.pattern.command.cmd.Cmd;

public abstract class AbstractExecutor<T extends Cmd> implements Executor {
    protected abstract void doExec(T cmd);

    @Override
    @SuppressWarnings("unchecked")
    public void exec(Cmd cmd) {
        doExec((T) cmd);
    }
}
